<script setup lang="ts"></script>

<template>
  <div class="portal-custom-loading">
    <div class="portal-loading-body">
      <div class="loading-first">
        <div class="balls-item first"></div>
        <div class="balls-item second"></div>
      </div>
    </div>
  </div>
</template>

<style scoped lang="scss">
.portal-custom-loading {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.7);
  z-index: 1000000;
  .portal-loading-body {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    .loading-first {
      width: 44px;
      position: relative;
      .balls-item {
        position: absolute;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        animation: balls-first-one 1.05s ease-in-out infinite;
      }
      .balls-item.first {
        background-color: #409eff;
        left: -2px;
      }
      .balls-item.second {
        background-color: #67c23a;
        right: -2px;
        animation: balls-first-tow 1.05s ease-in-out infinite;
      }
    }
  }
}
@keyframes balls-first-one {
  from {
    z-index: 1;
  }
  50% {
    transform: translateX(calc(16px + 3 * 2px));
  }
}
@keyframes balls-first-tow {
  50% {
    transform: translateX(calc(-16px + 3 * 2px));
  }
}
</style>
